package com.asurplus.business.entity;

import com.asurplus.common.annotation.Dict;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * app版本信息
 * </p>
 *
 * @author lizhou
 * @since 2021-01-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("app_version")
@ApiModel(value = "AppVersion对象", description = "app版本信息")
public class AppVersion extends Model<AppVersion> {


    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "APP名称")
    @TableField("app_name")
    private String appName;

    @ApiModelProperty(value = "版本号")
    @TableField("version_code")
    private Integer versionCode;

    @ApiModelProperty(value = "版本名称")
    @TableField("version_name")
    private String versionName;

    @ApiModelProperty(value = "版本信息")
    @TableField("version_info")
    private String versionInfo;

    @ApiModelProperty(value = "是否强制更新（0-否1-是）")
    @TableField("force_update")
    @Dict(dictCode = "app_force_update")
    private Integer forceUpdate;

    @ApiModelProperty(value = "下载地址")
    @TableField("download_url")
    private String downloadUrl;

    @ApiModelProperty(value = "创建者")
    @TableField("create_user")
    private Integer createUser;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("update_user")
    private Integer updateUser;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value = "删除状态（0--未删除1--已删除）")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
